home *** CD-ROM | disk | FTP | other *** search
- Path: news.nstn.ca!news
- From: nstn181a@fox.nstn.ca (Pierre G. Boutquin)
- Newsgroups: comp.lang.c,comp.lang.c++,comp.lang.perl
- Subject: Re: Stupid array problems
- Date: Mon, 15 Jan 96 20:09:44 -0400
- Organization: Nova Scotia Technology Network
- Message-ID: <4dettv$3q1@news.nstn.ca>
- NNTP-Posting-Host: toronto-ts-32.nstn.ca
-
- In <4dbfd1$2hpc@news.gate.net>, William Hutto writes:
- >In article <4d9b9v$14n@paperboy.ids.net>,
- > scarney@conan.ids.net (scarney) wrote:
- >>Ok, I've been having what I thought would be a simple problem but no one
- >>seems to quite figure out. I Have an array of strings, both the key and
- >>the string being pointers. Putting information onto the array is like a
- >>stack. My problem comes in the removal of information from it. Popping
- >>from a stack only pulls the lastelement out of the array, I want to pull
- >>any element out. Destroying the data isn't the hard part because I just
- >>blow up the pointers...the problem is that the indexing for the array
- >>gets kind of screwy. If I have an array organized by integers with
- >>elements 1 2 3 4 5 6 7 8, if I decided to kill element #4 I'm going to
- >>have an array of 1 2 3 5 6 7 8.
-
- Why not use a linked list?
-
- Pierre.
-